﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UNSWThink
{
   /// <summary>
   /// Object that represents a Term entry in the database
   /// </summary>
   public class Term
   {
      private int id;
      private string session;
      private DateTime startTime;
      private DateTime finishTime;

      /// <summary>
      /// Default constructor
      /// </summary>
      public Term()
      {
         id = 0;
         session = String.Empty;
         startTime = new DateTime();
         finishTime = new DateTime();
      }

      /// <summary>
      /// Alternate constructor
      /// </summary>
      /// <param name="id">
      /// ID of the record
      /// </param>
      /// <param name="session">
      /// Session code
      /// </param>
      /// <param name="startTime">
      /// Starting time of the term
      /// </param>
      /// <param name="finishTime">
      /// Finishing time of the term
      /// </param>
      public Term(int id, string session, DateTime startTime, DateTime finishTime)
      {
         this.id = id;
         this.session = session;
         this.startTime = startTime;
         this.finishTime = finishTime;
      }

      /// <summary>
      /// Gets or sets the ID
      /// </summary>
      public int ID
      {
         get
         {
            return id;
         }
         set
         {
            id = value;
         }
      }

      /// <summary>
      /// Gets or sets the session code
      /// </summary>
      public string Session
      {
         get
         {
            return session;
         }
         set
         {
            session = value;
         }
      }

      /// <summary>
      /// Gets or sets the starting time
      /// </summary>
      public DateTime StartTime
      {
         get
         {
            return startTime;
         }
         set
         {
            startTime = value;
         }
      }

      /// <summary>
      /// Gets or sets the finishing time
      /// </summary>
      public DateTime FinishTime
      {
         get
         {
            return finishTime;
         }
         set
         {
            finishTime = value;
         }
      }
   }
}
